how to change key and value of object